﻿using System.Windows.Forms;

namespace todo.Ribbon
{
    internal class RibbonPlaceholder : Control
    {
        public RibbonPlaceholder()
        {
            base.Dock = DockStyle.Top;
            this.SetStyle(ControlStyles.UserPaint, false);
            this.SetStyle(ControlStyles.Opaque, true);
        }

        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);

            ControlPaint.DrawContainerGrabHandle(e.Graphics, this.ClientRectangle);
        }

        protected override CreateParams CreateParams
        {
            get
            {
                var createParams = base.CreateParams;
                createParams.Style |= 0x02000000;
                return createParams;
            }
        }
    }
}